<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>

  // 1、JS 从字符串中提取出汉字方法
  var name = "这是AB一段CD文字"
  var reg = /[\u4e00-\u9fa5]/g;
  var names = name.match(reg);
  console.log('names  ----->  ', names);
  name = names.join("");
  console.log(name);
</script>

</html>